package com.dang.alex.service.imp;

import java.util.List;

import com.dang.alex.dao.DAOFactory;
import com.dang.alex.model.Book;
import com.dang.alex.model.Product;
import com.dang.alex.service.ProductService;

public class ProductServiceImp implements ProductService {
	public Book findById (int id)throws Exception{
		return DAOFactory.getProductDAO().findById(id);
	}
	public List<Book> findAll ()throws Exception{
		return DAOFactory.getProductDAO().findAll();
	}
	public List<Product> findByHot (int id)throws Exception{
		return DAOFactory.getProductDAO().findByHot(id);
	}
	public List<Book> findByNew (int id)throws Exception{
		return DAOFactory.getProductDAO().findByNew(id);
	}
	
}
